Imports System.Web.Security

Public Class IdentityUser

    Public Shared Function UserCode() As String
        Try
            Dim Id As FormsIdentity = CType(My.User.CurrentPrincipal.Identity, FormsIdentity)
            Dim Ticket As FormsAuthenticationTicket = Id.Ticket
            Return Ticket.UserData

        Catch ex As Exception
            Throw ex
        End Try

        Return String.Empty
    End Function

End Class
